package org.atguigu.spring6.iocxml.ditest;

/**
 * 员工类
 */
public class Emp {
    //员工属于某个部门
    private Dept dept;

    public Dept getDept() {
        return dept;
    }

    public String getEname() {
        return ename;
    }

    public Integer getAge() {
        return age;
    }

    private String ename;
    private Integer age;

    //爱好
    private String[] loves;

    public void work(){
        System.out.println(ename + "emp work....." +age);
        System.out.println("部门："+dept.getDname());
        for (String love : loves) {
            System.out.println("爱好："+love);
        }
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }
    public void setEname(String ename) {
        this.ename = ename;
    }
    public void setAge(Integer age) {
        this.age = age;
    }

    public String[] getLoves() {
        return loves;
    }

    public void setLoves(String[] loves) {
        this.loves = loves;
    }
}
